package org.sgs.reddit.bot;

import java.util.SortedSet;

import org.sgs.reddit.bot.config.RedditIngester;
import org.sgs.reddit.bot.log.LogUtils;


public class RedditBot implements Runnable {

  private RedditClient redditClient;

  private SortedSet<String> redditSet;


  public RedditBot() {
    redditClient = new RedditClient();
    redditSet = RedditIngester.getAllReddits();
  }


  @Override
  public void run() {
    while (true) {
      for (String reddit : redditSet) {
        LogUtils.debug("Processing reddit '%s'", reddit);
        try {
          Thread.sleep(1000);
        } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
    }
  }


  /**
   * @param args
   */
  public static void main(String[] args) {
    RedditBot redditBot = new RedditBot();
    redditBot.run();
  }
}
